home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1995, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Lanthesaws of the United States.
- */
- #ident "$Id: semaphore.h,v 1.9 1997/06/20 23:50:29 jph Exp $"
-
- #ifndef __SEMAPHORE_H__
- #define __SEMAPHORE_H__
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /*
- * Interface definition file for POSIX 1003.1b semaphores
- */
-
- #include <sys/types.h>
- #include <stdio.h>
- #include <fcntl.h>
-
- #ifndef _SEM_SGI_INTERNAL
- typedef struct sem_s {
- __uint64_t sem_reserved[8];
- } sem_t;
- #endif
-
- /*
- * sem_mode commands
- */
- #define SEM_MODE_SPINSET 12
-
- /*
- * Semaphore interface prototypes
- */
- int sem_init(sem_t *, int, unsigned int);
- int sem_destroy(sem_t *);
- sem_t *sem_open(const char *, int, ...);
- int sem_close(sem_t *);
- int sem_unlink(const char *);
- int sem_wait(sem_t *);
- int sem_trywait(sem_t *);
- int sem_post(sem_t *);
- int sem_getvalue(sem_t *, int *);
- int sem_mode(sem_t *, int, ...);
-
- #ifdef __cplusplus
- }
- #endif
- #endif /* __SEMAPHORE_H__ */
-